From: Rui Matos Date: Mon, 11 May 2015 13:59:24 +0000 (+0200) Subject: ScreenShield: ensure we don't leak logind inhibitors X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~1354 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=15baa56584b6ac0477b438d13fa532e74a85df9a;p=gnome-shell.git ScreenShield: ensure we don't leak logind inhibitors This could happen if we are VT switched away and an animated activation is requested because we're preparing to enter sleep. Since we don't animate in this case we'd never reach _completeLockScreenShown() before coming out of sleep, at which point we _inhibitSuspend() again and would leak the previous inhibitor. https://bugzilla.gnome.org/show_bug.cgi?id=749228 --- diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js index 1cfc21177..d50113f88 100644 --- a/js/ui/screenShield.js +++ b/js/ui/screenShield.js @@ -667,6 +667,8 @@ const ScreenShield = new Lang.Class({ _inhibitSuspend: function() { this._loginManager.inhibit(_("GNOME needs to lock the screen"), Lang.bind(this, function(inhibitor) { + if (this._inhibitor) + this._inhibitor.close(null); this._inhibitor = inhibitor; })); },